<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <link rel="stylesheet" type="text/css" href="../css/api.css" />
</head>
<style>
    html,
    body {
        background-color: #fff;
    }

    .placeholder_div {
        background-color: #fbf9f9;
    }

    .none {
        text-align: center;
        margin: 0.5rem 0;
        font-size: 0.6rem;
    }

    .show_info {
        padding: 0.5rem;
    }

    .show_info img {
        object-fit: scale-down;
    }

    .show_info p {
        font-size: 0.7rem;
    }
</style>

<body>
    <div  id="app" v-cloak>
        <div class="placeholder_div"></div>
        <p class="none" v-if="!detail">暂无药房详情介绍</p>
        <div class="show_info" v-else>
            <img :src="detail.image" alt="">
            <p>{{detail.introduce}}</p>
            <p class="v-html">{{detail.content}}</p>
        </div>
    </div>
</body>

</html>
<script src="../script/set_root.js"></script>

<script type="text/javascript" src="../script/api.js"></script>
<script type="text/javascript" src="../script/zepto.min.js"></script>
<script type="text/javascript" src="../script/hb.js"></script>
<script type="text/javascript" src="../script/vue.js"></script>
<script type="text/javascript">
    apiready = function () {
        hb_ready();
        get_pharmacy_detail()
    }
    //使用vue对数据进行绑定
    var app = new Vue({
        el: '#app',
        data: {
            detail: "",
        },
        methods: {

        },

    })

    function get_pharmacy_detail() {
        get_ajax("store/view", {
            id: api.pageParam.id
        }, function (res, err) {
            if (res.code == 2000) {
                // alert(JSON.stringify(res))
                app.detail = res.data
            } else {
                alert("网络不通畅，请稍后再试！")
            }
        })
    }
</script>